ccgeofandomcom-20200214-history
Basic Seismic Data Manipulation
=Extracting the Files= Now we have to get into that file. Easiest way to do so is to transfer all the zip files from stations that you are going to use and transfer them to the MacPro (and probably place them into the Seismo directory within the geostudents user folder). Then just tell the computer to open all the zip files and go for a run, or mountain bike, or climb for the afternoon. If your are going to open all the zip files from the Bighorn array it is going to take a while. After your afternoon activity you will come back to find lots of folders with the same name as the ZIP files that you just opened that contain five folders (cont, data, recover, sdata, and wfdisc). The folder that contains all the interesting-ness is the data folder, but it doesn't mean much to us right now. Remember how we had those 00 overflow files? Well those files create their own folders, and we need to merge them together before we can get to work. just drag and drop the files from the first folder in the 00 directory into it's corresponding normally named folder, and then just copy the other folders into the original directory. Sweet! Now we are ready for the longest slowest step in the world and getting down and dirty in the command line. This might be a good time to check out some command line basics =Making a database= So now that we can see the actual files, and have a working environment, lets change those files into something that is actually useful for working with all these offline antelope tools. The actual filetype/directory structure that was contained in the ZIP files is the miniseed file format, and we want to end up with a database, so what do the geeks naturally name the program? miniseed2db easily enough, which is a relief because when a programmer gets creative usually they are causing mass distraction, or you will never remember the name of the program again. Type miniseed2db into the command line and then start dragging in the data/ folders from each station that you want in your database. Make sure you add a * after each data/ folder (data/*) so that the program finds all the randomly named junk in the folder. You can add as many stations data folders as you want at this point, and you will be happier in the long run doing so, because it's a real pain to merge multiple databases together at a later point without starting up a full fledged ORB server. Once you've added all the data files you wish to throw in another space and end the command with the name that you would like the database to have. So the command will look something like this miniseed2db /Users/geostudents/Seismo/BASE_Service_04/2009246.XX-BH1F/data/* /Users/geostudents/Seismo/BASE_Service_04/2009246.XX-BH3F/data/* /Users/geostudents/Seismo/BASE_Service_04/2009247.XX-BH1D/data/* /Users/geostudents/Seismo/BASE_Service_04/2009246.XX-BH1G/data/* /Users/geostudents/Seismo/BASE_Service_04/database That long string of ugly that we just typed will add the data from stations BH1F, BH3F, BH1D, and BH1G, to a new database named database. In theory it might be possibly to use miniseed2db to add to an existing database, but I haven't tried it yet, and I wouldn't suggest that anyone else should at this point. So we have our ugly, and it looks ready to go, which means that we should check again to make sure everything is correct, then we can hit enter. At this point the terminal window should seemingly start to overflow with gibberish (it's print out each file that it reads into the database, and the files size). Because this seems to take anywhere between the same amount of time to twice as long as extracting the files from the ZIP archive this is often a great time to head out and party, or go to bed if you are one of the strange people like me that like to sleep something this century. You might want to hide the terminal window, and put a note on the computer that it is geekly rocking out and that you would greatly appreciate if it was not disturbed. So hopefully in the morning you have a big honkin' database sitting, and the computer is not still chugging and trying to burn Palmer down. Now we can make that database do stuff. What kind of stuff you ask? Wicked cool stuff.